<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Movie',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool
		
		/*'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'123456',
		 	// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1','::1'),
		),
		*/
		
	),

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'class' => 'WebUser',
			'allowAutoLogin'=>true,
		),
		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
		
		// 'db'=>array(
		// 	'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		// ),
		
		// uncomment the following to use a MySQL database
		
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=mobiletv',
			'emulatePrepare' => true,
			'username' => 'mobiletv',
			'password' => 'fSda9zzheHphVSww',
			'charset' => 'utf8',
		),
		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),
	
	//them dong nay
	'behaviors'=>array(
		'runEnd'=>array(
			'class'=>'application.components.WebApplicationEndBehavior',
	 	),
	), 
	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'		=>'trung.aptvn@gmail.com',
		'domain'		=>'http://3gstore.vn',
		
		//payment
		'paymentUrl'		=>'http://pay.vpop.vn/zpay/route',
		'applicationId'	=>'1351486409934',
		'appSecret'		=>'bdebdbd9b584f8c77d1e0a07687f514d',
		
		//Log file
		'pathLogFile'		=>'/home/mobiletv/log/log.txt',
		'pathLogFile_MBL'	=>'/home/mobiletv/log/log_mobilink.txt',
		// live tv streaming
		'tv_url_android'	=>'rtsp://media.vpop.vn:1935/live/_definst_/',
		'tv_url_ios'		=>'http://media.vpop.vn:1935/live/_definst_/',
		'tv_url_wp'		=>'http://media.vpop.vn:1210/',
		'tv_url_mb'		=>'rtsp://media.vpop.vn:1935/live/_definst_/',
		'tv_type_android'	=>'',
		'tv_type_ios'		=>'/playlist.m3u8',
		'tv_type_wp'		=>'.asf',
		'tv_type_mb'		=>'',
		'servers'		=>array(
					'http://www.youtube.com/watch?v='				=>'Youtube',
					'http://video.google.com/googleplayer.swf?docId='	=>'Googlevideo',
					'http://content.go.vn/may-tinh/chi-tiet/'			=>'Go.vn'	,
					'http://kine.cyworld.vn/detail/'				=>'cyworld.vn',
					'http://www.4shared.com/get/Fjy78IUO/'			=>'4shared.com',
					'http://www.dailymotion.com/video/'			=>'Dailymotion',
					'http://www.veoh.com/watch/6434084aKzQBMKs'		=>'Veoh',
					'http://www.megavideo.com/v/'				=>'Megavideo',
					''								=>'Zigma',							
		),
	),
);